Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.social.workspace.content.views

Contributions

XML Source

<?xml version="1.0" encoding="UTF-8"?>
<component name="org.nuxeo.ecm.social.workspace.content.views">

<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService"
  point="contentViews">

    <contentView name="SocialWorkspaces">
      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <pattern>SELECT * FROM SocialWorkspace WHERE (ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0)</pattern>
        <sort column="dc:title" ascending="true"/>
        <pageSize>10</pageSize>
      </coreQueryPageProvider>
      <useGlobalPageSize>true</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>#{currentDocument.id}</cacheKey>
      <cacheSize>10</cacheSize>
      <selectionList>CURRENT_SELECTION</selectionList>
      <actions category="MODERATE_SOCIAL_WORKSPACE"/>
      <resultLayouts>
        <layout name="SocialWorkspaces@cvListingLayout" title="document_listing" translateTitle="true" iconPath="/icons/document_listing_icon.png"/>
      </resultLayouts>
    </contentView>

    <contentView name="article_listing_view">
      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <pattern>
          SELECT *
            FROM Article
           WHERE ecm:isProxy = ?
                 AND ecm:mixinType != 'HiddenInNavigation'
                 AND ecm:isCheckedInVersion = 0
                 AND ecm:currentLifeCycleState != 'deleted'
                 AND ecm:path STARTSWITH ?
        </pattern>
        <pageSize>50</pageSize>
        <parameter>#{socialWorkspaceActions.isCurrentUserAdministratorOrMemberOfCurrentSocialWorkspace() ? 0 : 1}
        </parameter>
        <parameter>#{socialWorkspaceActions.getSocialWorkspace().getPath()}
        </parameter>
        <sort column="dc:created" ascending="true"/>
      </coreQueryPageProvider>
      <showPageSizeSelector>false</showPageSizeSelector>
      <showRefreshCommand>false</showRefreshCommand>
      <useGlobalPageSize>false</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>#{currentDocument.id}</cacheKey>
      <cacheSize>10</cacheSize>
      <selectionList>CURRENT_SELECTION</selectionList>
      <resultLayouts>
        <layout name="article_listing" title="document_listing"
          translateTitle="false" iconPath="/icons/document_listing_icon.png" />
      </resultLayouts>
    </contentView>

    <contentView name="news_items_listing_view">
      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <pattern>
          SELECT *
            FROM NewsItem
           WHERE ecm:isProxy = 0
                 AND ecm:mixinType != 'HiddenInNavigation'
                 AND ecm:isCheckedInVersion = 0
                 AND ecm:currentLifeCycleState != 'deleted'
                 AND ecm:path STARTSWITH ?
        </pattern>
        <pageSize>50</pageSize>
        <parameter>#{socialWorkspaceActions.getSocialWorkspace().getPath()}
        </parameter>
        <sort column="dc:created" ascending="true"/>
      </coreQueryPageProvider>
      <showPageSizeSelector>false</showPageSizeSelector>
      <showRefreshCommand>false</showRefreshCommand>
      <useGlobalPageSize>false</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>#{currentDocument.id}</cacheKey>
      <cacheSize>10</cacheSize>
      <selectionList>CURRENT_SELECTION</selectionList>
      <resultLayouts>
        <layout name="news_item_listing" title="document_listing"
          translateTitle="false" iconPath="/icons/document_listing_icon.png" />
      </resultLayouts>
    </contentView>

    <contentView name="file_listing_view">
      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <pattern>
          SELECT *
            FROM File
           WHERE ecm:isProxy = ?
                 AND ecm:mixinType != 'HiddenInNavigation'
                 AND ecm:isCheckedInVersion = 0
                 AND ecm:currentLifeCycleState != 'deleted'
                 AND ecm:path STARTSWITH ?
          </pattern>
        <pageSize>50</pageSize>
        <parameter>#{socialWorkspaceActions.isCurrentUserAdministratorOrMemberOfCurrentSocialWorkspace() ? 0 : 1}
        </parameter>
        <parameter>#{socialWorkspaceActions.getSocialWorkspace().getPath()}
        </parameter>
        <sort column="dc:created" ascending="true"/>
      </coreQueryPageProvider>
      <showPageSizeSelector>false</showPageSizeSelector>
      <showRefreshCommand>false</showRefreshCommand>
      <useGlobalPageSize>false</useGlobalPageSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
      <cacheKey>#{currentDocument.id}</cacheKey>
      <cacheSize>10</cacheSize>
      <selectionList>CURRENT_SELECTION</selectionList>
      <resultLayouts>
        <layout name="file_listing" title="document_listing"
          translateTitle="false" iconPath="/icons/document_listing_icon.png" />
      </resultLayouts>
    </contentView>

    <contentView name="user_social_workspace_view">
      <coreQueryPageProvider>
        <property name="coreSession">#{documentManager}</property>
        <pattern>SELECT * FROM SocialWorkspace WHERE (ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted')</pattern>
        <sort column="dc:title" ascending="true"/>
      </coreQueryPageProvider>
      <showPageSizeSelector>false</showPageSizeSelector>
      <showRefreshCommand>false</showRefreshCommand>
      <useGlobalPageSize>false</useGlobalPageSize>
      <cacheKey>nocache</cacheKey>
      <cacheSize>1</cacheSize>
      <refresh>
        <event>documentChanged</event>
        <event>documentChildrenChanged</event>
      </refresh>
    </contentView>

  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager" point="layouts">
    <layout name="SocialWorkspaces@cvListingLayout">
      <templates>
        <template mode="any">/layouts/layout_listing_ajax_template.xhtml</template>
        <template mode="edit_columns">/layouts/layout_column_selection_template.xhtml</template>
        <template mode="edit_sort_infos">/layouts/layout_sort_infos_template.xhtml</template>
        <template mode="edit_sort_infos_map">/layouts/layout_sort_infos_template.xhtml</template>
      </templates>
      <properties mode="any">
        <property name="showListingHeader">true</property>
        <property name="showRowEvenOddClass">true</property>
      </properties>
      <properties mode="edit_columns">
        <property name="availableElementsLabel">label.selection.availableColumns</property>
        <property name="selectedElementsLabel">label.selection.selectedColumns</property>
        <property name="selectedElementsHelp"></property>
        <property name="selectSize">10</property>
        <property name="displayAlwaysSelectedColumns">false</property>
      </properties>
      <properties mode="edit_sort_infos">
        <property name="newSortInfoTemplate">#{documentSearchActions.newSortInfo}</property>
        <property name="required">false</property>
      </properties>
      <properties mode="edit_sort_infos">
        <property name="newSortInfoTemplate">#{documentSearchActions.newSortInfoMap}</property>
        <property name="required">false</property>
      </properties>
      <columns>
        <column name="selection" alwaysSelected="true">
          <properties mode="any">
            <property name="isListingSelectionBox">true</property>
            <property name="useFirstWidgetLabelAsColumnHeader">false</property>
            <property name="columnStyleClass">iconColumn</property>
          </properties>
          <widget>listing_ajax_selection_box</widget>
        </column>
        <column name="listing_title_link">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">Title</property>
            <property name="sortPropertyName">dc:title</property>
          </properties>
          <widget>listing_title_link</widget>
        </column>
        <column name="created">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">Creation Date</property>
            <property name="sortPropertyName">dc:created</property>
          </properties>
          <widget>created</widget>
        </column>
        <column name="creator">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">Creator</property>
            <property name="sortPropertyName">dc:creator</property>
          </properties>
          <widget>creator</widget>
        </column>
        <column name="description">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">Description</property>
            <property name="sortPropertyName">dc:description</property>
          </properties>
          <widget>description</widget>
        </column>
        <column name="isPublic">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">IsPublic</property>
            <property name="sortPropertyName">socialw:isPublic</property>
          </properties>
          <widget>isPublic</widget>
        </column>
        <column name="listing_lifecycle">
          <properties mode="any">
            <property name="useFirstWidgetLabelAsColumnHeader">true</property>
            <property name="columnStyleClass"></property>
            <property name="label">Lifecycle state</property>
            <property name="sortPropertyName">ecm:currentLifeCycleState</property>
          </properties>
          <widget>listing_lifecycle</widget>
        </column>
      </columns>
      <widget name="listing_title_link" type="listing_title_link">
        <labels>
          <label mode="any">label.content.header.title</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data</field>
          <field>data.ref</field>
          <field>data.dc.description</field>
          <field>data.file.content</field>
          <field>data.file.filename</field>
        </fields>
        <properties mode="any"/>
      </widget>
      <widget name="created" type="datetime">
        <labels>
          <label mode="any">label.content.header.created</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data.dc.created</field>
        </fields>
        <properties mode="any"/>
      </widget>
      <widget name="creator" type="text">
        <labels>
          <label mode="any">label.content.header.author</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data.dc.creator</field>
        </fields>
        <properties mode="any"/>
      </widget>
      <widget name="description" type="text">
        <labels>
          <label mode="any">label.content.header.description</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data.dc.description</field>
        </fields>
        <properties mode="any"/>
      </widget>
      <widget name="isPublic" type="checkbox">
        <labels>
          <label mode="any">label.content.header.public</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data.socialw.isPublic</field>
        </fields>
        <properties mode="any"/>
      </widget>
      <widget name="listing_lifecycle" type="listing_lifecycle">
        <labels>
          <label mode="any">label.content.header.currentLifecycleState</label>
        </labels>
        <translated>true</translated>
        <fields>
          <field>data.currentLifeCycleState</field>
        </fields>
        <properties mode="any"/>
      </widget>
    </layout>
  </extension>
</component>